<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: 15c
  Date: 2017/6/7
  Time: 11:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
</head>
<body>
<jsp:include page="head.jsp"/>
<br>

<div style="height: auto;width: 100%;text-align: center">

    <div style="float: left;font-weight: bold"><span>学号:</span><span style="color: darkorange">${sno}</span>
    </div>
    <div style="float: left;font-weight: bold;margin-left: 2%"><span>姓名:</span><span
            style="color: darkorange">${sname}</span>
    </div>
    <br>
    <table style="float: left" border="5" cellpadding="4" cellspacing="3" align="center">
        <thead>
        <tr>
            <th>课程号</th>
            <th>课程名</th>
            <th>课程学分</th>
            <th>成绩</th>
        </tr>
        </thead>
        <c:forEach items="${courseList}" var="course">
            <tr>
                <sf:form action="${pageContext.request.contextPath}/students/add_grade?sno=${sno}" method="post">
                    <td><input type="text" name="cno" value="${course.cno}" readOnly="true"
                               style="border: none;text-align: center"/></td>
                    <td><input type="text" name="cname" value="${course.cname}" readOnly="true"
                               style="border: none;text-align: center"/></td>
                    <td><input type="text" name="ccredit" value="${course.ccredit}" readOnly="true"
                               style="border: none;text-align: center"/></td>
                    <td>
                        <input type="text" name="grade"
                               style="text-align: center;border:1px solid #8a92ff;background-color:transparent;"/>
                    </td>
                    <td>
                        <input type="submit" value="提交"
                               style="border:3px solid #ccc;background:#cccccc;float: left;cursor: pointer">
                        <a href="${pageContext.request.contextPath}/students/view_results?sno=${sno}&sname=${sname}"><input
                                type="button" value="取消"
                                style="border:3px solid #ccc;background:#cccccc;float: left;margin-left: 5px;cursor: pointer"></a>
                    </td>
                </sf:form>
            </tr>
        </c:forEach>
    </table>
</div>
</body>
</html>
